/*
 * @Description  : 主入口
 * @Autor        : 杜康
 * @Date         : 2023-03-07 15:07:13 +0800
 * @LastEditors  : 杜康
 * @LastEditTime : 2025-11-06 00:08:43 +0800
 */
import { createApp } from "vue";
import { createPinia } from "pinia";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import App from "./App.vue";
import router from "./router";
import "normalize.css/normalize.css";
import "@/styles/base.less";
import "font-awesome/css/font-awesome.min.css";
// 引入 md-editor-v3
import { MdEditor, MdPreview } from "md-editor-v3";
import "md-editor-v3/lib/style.css";

import * as ElementPlusIconsVue from "@element-plus/icons-vue";

const app = createApp(App);
app.use(ElementPlus, {
  locale: zhCn
});
app.use(ElementPlus, { size: "default", zIndex: 3000 });
// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
app.use(createPinia());
// 全局注册组件
app.component("MdEditor", MdEditor);
app.component("MdPreview", MdPreview);
app.use(router);

app.mount("#app");
